import React from 'react'
import { Modal, Button } from 'antd-mobile'

function IdcardUploadMessage(props) {
  const { close, url } = props

  return (
    <div className="idcard-upload-message">
      <Modal
        visible={!!url}
        onClose={close}
        transparent
        title=""
        className="idcard-upload-message--modal"
      >
        <p>
          <img src={require('../../assets/images/idcard-upload.jpeg')} alt=""/>
        </p>
        <p className="content">
        </p>
        <p>
          <Button
            type="warning"
            onClick={() => {
              window.location.href = url
              close()
            }}
          >
            立即上传
          </Button>
        </p>
      </Modal>
    </div>
  )
}

export default IdcardUploadMessage
